<div class="row">
    <div class="col-lg-12">
        <div class="ibox">
            <div class="ibox-title">
                <h5>
                    <vc:i18n name="添加" namespace="addEventObject"></vc:i18n>
                </h5>
                <div class="ibox-tools" style="top:10px;">
                    <button type="button" class="btn btn-white btn-sm" v-on:click="vc.goBack()">
                        <i class="fa fa-close"></i>返回
                    </button>
                </div>
            </div>
            <div class="ibox-content">
                <div class="form-group row">
                    <label class="col-sm-2 col-form-label">
                        <vc:i18n name='对象类型' namespace='addEventObject'></vc:i18n>
                    </label>
                    <div class="col-sm-10">
                        <select class="custom-select" v-model="addEventObjectInfo.objType" @change="queryMachineByObjType()">
                            <option selected disabled value="">{{vc.i18n('必填，请选择对象类型','addEventObject')}}</option>
                            <option v-for="(item, index) in objTypeList" :key="index" :value="item.statusCd">
                                {{item.name}}
                            </option>
                        </select>
                    </div>
                </div>
                <div class="form-group row" v-if="iotMachineList.length !== 0 && addEventObjectInfo.ruleId !== ''">
                    <label class="col-sm-2 col-form-label">
                        <vc:i18n name='设备对象' namespace='addEventObject'></vc:i18n>
                    </label>
                    <div class="col-sm-9">
                        <textarea v-model="objectNameOnlyView" type="text" disabled rows="10"
                            :placeholder="vc.i18n('必填，请选择设备','addEventObject')" class="form-control">
                        </textarea>
                    </div>
                    <div class="col-sm-1">
                        <button type="button" class="btn btn-primary btn-sm" v-on:click="selectIotMachine()">选择</button>
                    </div>
                </div>
                <div class="form-group row">
                    <label class="col-sm-2 col-form-label">
                        <vc:i18n name='状态' namespace='addEventObject'></vc:i18n>
                    </label>
                    <div class="col-sm-10">
                        <select class="custom-select" v-model="addEventObjectInfo.state">
                            <option selected disabled value="">{{vc.i18n('必填，请选择状态','addEventObject')}}</option>
                            <option value="ON">{{vc.i18n('生效','addEventObject')}}</option>
                            <option value="OFF">{{vc.i18n('失效','addEventObject')}}</option>
                        </select>
                    </div>
                </div>
                <div class="form-group row">
                    <label class="col-sm-2 col-form-label">
                        <vc:i18n name='备注' namespace='addEventObject'></vc:i18n>
                    </label>
                    <div class="col-sm-10">
                        <textarea v-model="addEventObjectInfo.remark" :placeholder="vc.i18n('选填，请填写备注','addEventObject')" class="form-control" rows="3"></textarea>
                    </div>
                </div>
                <div class="ibox-content">
                    <button class="btn btn-primary float-right" type="button" v-on:click="saveEventObjectInfo()">
                        <i class="fa fa-check"></i>&nbsp;
                        <vc:i18n name="保存"></vc:i18n>
                    </button>
                </div>
            </div>
        </div>
    </div>
</div>
    <vc:create path="event/chooseIotMachine" emitChooseIotMachine="" emitLoadData=""></vc:create>